package com.qiqidream.admin.common.config;

import com.qiqidream.admin.common.factory.ResourceFactory;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * api加密 配置
 * @author QiQiDream
 * @since 2020/1/6 17:41
 */
@Component
@PropertySource(value = "classpath:application-config.yml", factory = ResourceFactory.class)
@ConfigurationProperties(prefix = "encode.config")
@Data
public class EncodeConfig {
    /**
     * 是否启用
     */
    private Boolean enabled = false;
    /**
     * 密钥：字符串必须16位或32位
     */
    private String key = "jhqn-qiqidream-1";
    /**
     * 偏移量：字符串必须16位
     */
    private String iv = "jhqn-qiqidream-2";
}
